﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace GameSchool.Models
{
	/// <summary>
	/// AnswerOption er notaður sem tenging við gagnagrunninn og geymir réttan svarmöguleika. 
	/// Hann heldur líka utanum hvort nemendur svari t.d. krossaspurningum rétt.
	/// </summary>  
	
	[Table("gs_answer_option")]
	public class AnswerOption
    {
        [Key]
		[Column("answer_option_id")]
		public int AnswerOptionId { get; set; }

        [Column("question_id")]
        public int QuestionId { get; set; }

        [ForeignKey("QuestionId")]
        public virtual AssignmentQuestion Question { get; set; }

		[Column("answer_text")]
		[Display(Name = "Svar")]
        public string AnswerText { get; set; }

		[Column("is_correct_answer")]
        public bool IsCorrectAnswer { get; set; }

		[Column("active")]
        public bool Active { get; set; }
    }
}